import { Body, Controller, Post, Req } from '@nestjs/common';
import { ApiOkResponse, ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
import { ADMIN_PREFIX } from '../../admin.constants';
import { ReportFormMachineAlarmStatisticsService } from './machineAlarmStatistics.service';

@ApiSecurity(ADMIN_PREFIX)
@ApiTags('设备告警统计模块')
@Controller('machineAlarmStatistics')
export class ReportFormMachineAlarmStatisticsController {
  constructor(private machineAlarmStatisticsService: ReportFormMachineAlarmStatisticsService) {}

  @ApiOperation({ summary: '获取设备告警统计列表' })
  @ApiOkResponse()
  @Post('list')
  async list(@Body() dto) {
    return await this.machineAlarmStatisticsService.list(dto);
  }
}
